﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Models;
using BLL;

namespace CSMF
{
    public partial class TeamDetail : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                int id = Convert.ToInt32(Request.QueryString["id"]);
                Team team = TeamManager.GetTeamByID(id);
                litTitle.Text = team.Title;
                litPurpose.Text = team.Purpose;
                litTeamContent.Text = team.TeamContent;
                BindVideo(id);
            }
        }

        protected void BindVideo(int id)
        {
            IList<Hollywood> pic = HollywoodManager.GetHollywoodsByTeamID(id);
            rptVideo.DataSource = pic;
            rptVideo.DataBind();
        }
    }
}
